package org.common.utils.fasttest.entity.codec;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.smile.SmileFactory;

/**
 * Redisson通用smile json解析
 *
 * @author duxiang
 * @date 2024/4/17.
 */
public class RedissonSmileJacksonCodec extends RedissonJacksonCodec {
    public RedissonSmileJacksonCodec() {
        super(new ObjectMapper(new SmileFactory()));
    }

    public RedissonSmileJacksonCodec(ClassLoader classLoader) {
        super(createObjectMapper(classLoader, new ObjectMapper(new SmileFactory())));
    }

    public RedissonSmileJacksonCodec(ClassLoader classLoader, org.redisson.codec.SmileJacksonCodec codec) {
        super(createObjectMapper(classLoader, codec.getObjectMapper().copy()));
    }
}
